package com.huaju.enity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;

import static javax.persistence.GenerationType.IDENTITY;

import javax.persistence.Id;
import javax.persistence.Table;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * Rate entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "rate", catalog = "licai")
public class Rate implements java.io.Serializable {

	// Fields

	private Integer rid;
	private String rname;
	private Double rate;
	private Date creatTime;
	private Date changeTime;
	private Short isUse;

	// Constructors

	/** default constructor */
	public Rate() {
	}

	/** full constructor */
	public Rate(String rname, Double rate, Date creatTime,
			Date changeTime, Short isUse) {
		this.rname = rname;
		this.rate = rate;
		this.creatTime = creatTime;
		this.changeTime = changeTime;
		this.isUse = isUse;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "rid", unique = true, nullable = false)
	public Integer getRid() {
		return this.rid;
	}

	public void setRid(Integer rid) {
		this.rid = rid;
	}

	@Column(name = "rname")
	public String getRname() {
		return this.rname;
	}

	public void setRname(String rname) {
		this.rname = rname;
	}

	@Column(name = "rate", precision = 10)
	public Double getRate() {
		return this.rate;
	}

	public void setRate(Double rate) {
		this.rate = rate;
	}

	@Column(name = "creatTime", length = 19)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" ) 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
	public Date getCreatTime() {
		return this.creatTime;
	}

	public void setCreatTime(Date creatTime) {
		this.creatTime = creatTime;
	}

	@Column(name = "changeTime", length = 19)
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss" ) 
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss" ,timezone = "GMT+8")
	public Date getChangeTime() {
		return this.changeTime;
	}

	public void setChangeTime(Date changeTime) {
		this.changeTime = changeTime;
	}

	@Column(name = "isUse")
	public Short getIsUse() {
		return this.isUse;
	}

	public void setIsUse(Short isUse) {
		this.isUse = isUse;
	}

}